package com.xiaoma.h5testdemo.common.constants

import android.Manifest
import android.net.Uri

/**
 * author: liangjingbo
 * date: 2023/11/6
 * describe:
 */

object XmPermissions {
    val PERMISSIONS_LOCATION = arrayOf(
        Manifest.permission.ACCESS_FINE_LOCATION,
        Manifest.permission.ACCESS_COARSE_LOCATION
    )
}

object Constants {
    /**隐藏 loading 的进度阈值*/
    const val HIDDEN_LOADING_THRESHOLD = 70

    const val KEY_MAIN_FRG = "key_main_frg"
    const val KEY_WEB_FRG = "key_web_frg"

    var RADIO_USER_AGENT =
        "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.104 Safari/537.36 HeyTapBrowser/51.8.8"
    var SOCIAL_USER_AGENT =
        ""
    var VIDEO_USER_AGENT =
        ""
    var COMMON_USER_AGENT =
        ""

    var RADIO_URL = "https://tunein.com/"
    var SOCIAL_URL = "https://www.facebook.com/"
    var VIDEO_URL = "https://www.youtube.com/"
}

object JumpActions {
    const val ACTION_VIDEO = "com.xiaoma.seres.video"
    const val ACTION_SOCIAL = "com.xiaoma.seres.social"
    const val ACTION_RADIO = "com.xiaoma.seres.radio"
}

object PageStatus {
    const val STATUS_MAIN = 0
    const val STATUS_WEB = 1
}


object UsageStats {
    object Providers {
        const val AUTHORITY = "com.xiaoma.seres.usage.provider"
        const val USAGE_STATS_PATH = "UsageStatus"
        val CONTENT_URI = Uri.parse("content://$AUTHORITY/$USAGE_STATS_PATH")
    }

    object Column {
        const val RADIO_LAST_TIME = "radio_last_time"
        const val RADIO_TOTAL_TIME = "radio_total_time"
        const val RADIO_LAUNCH_COUNT = "radio_launch_count"

        const val VIDEO_LAST_TIME = "video_last_time"
        const val VIDEO_TOTAL_TIME = "video_total_time"
        const val VIDEO_LAUNCH_COUNT = "video_launch_count"

        const val SOCIAL_LAST_TIME = "social_last_time"
        const val SOCIAL_TOTAL_TIME = "social_total_time"
        const val SOCIAL_LAUNCH_COUNT = "social_launch_count"
    }

    object Constant {
        const val ACTION_COLUMN = "action_column"
        const val KEY_COLUMN_VALUE = "key_column_value"
    }

}